home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / UNIXLIB37B / !UnixLib37 / src / time / c / settod < prev    next >
Text File  |  1996-11-09  |  1KB  |  47 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/time/c/RCS/settod,v $
  4.  * $Date: 1996/04/19 21:35:00 $
  5.  * $Revision: 1.1 $
  6.  * $State: Rel $
  7.  * $Author: simon $
  8.  *
  9.  * $Log: settod,v $
  10.  * Revision 1.1  1996/04/19 21:35:00  simon
  11.  * Initial revision
  12.  *
  13.  ***************************************************************************/
  14.  
  15. static const char rcs_id[] = "$Id: settod,v 1.1 1996/04/19 21:35:00 simon Rel $";
  16.  
  17. #include <errno.h>
  18. #include <sys/time.h>
  19.  
  20. /* The `settimeofday' function sets the current date and time
  21.    according to the arguments.  As for `gettimeofday', time zone
  22.    information is ignored if TZP is a null pointer.
  23.  
  24.    You must be a privileged user in order to use `settimeofday'.
  25.  
  26.    The return value is `0' on success and `-1' on failure.  The
  27.    following `errno' error conditions are defined for this function:
  28.  
  29.    `EPERM'
  30.    This process cannot set the time because it is not privileged.
  31.  
  32.    `ENOSYS'
  33.    The operating system does not support setting time zone
  34.    information, and TZP is not a null pointer.  */
  35.  
  36.  
  37. /* Set the current time of day and timezone information.
  38.    This call is restricted to the super-user.  */
  39. int
  40. settimeofday (const struct timeval *tv, const struct timezone *tz)
  41. {
  42.   errno = EPERM;
  43.   tv = tv;
  44.   tz = tz;
  45.   return -1;
  46. }
  47.